
source("plotting.R")
library(tidyverse)


set.seed(123)

distance_rep = read_csv("../distance_main_effect_data.csv")

#p=distance_to_polling_place_scatter_rep(distance_rep)
#save_plot(paste0("figures_for_paper/figure3.pdf"), 
 #         p, base_height = 10, base_asp = 1.0,device = cairo_pdf)

p=distance_to_polling_place_scatter_rep_default(distance_rep)
save_plot(paste0("figures_for_replication/figure3.pdf"), 
          p, base_height = 10, base_asp = 1.0,device = cairo_pdf)



shock_rep = read_csv("../shock_main_effect_data.csv")
#p=distance_to_polling_place_scatter_rep(shock_rep,analysis="shock")
#save_plot(paste0("figures_for_paper/figure6.pdf"), 
#          p, base_height = 10, base_asp = 1.0,device = cairo_pdf)

p=distance_to_polling_place_scatter_rep_default(shock_rep,analysis="shock")
save_plot(paste0("figures_for_replication/figure6.pdf"), 
          p, base_height = 10, base_asp = 1.0,device = cairo_pdf)

